import request from '@/utils/request'

/**
 * 查询合同分页列表
 * @param {Object} query
 */
export function getPageList(data) {
  return request({
    url: '/employeeContract/getPageList',
    method: 'get',
    params: data
  })
}

/**
 * 新增合同
 * @param {Object} query
 */
export function add(data) {
  return request({
    url: '/employeeContract/add',
    method: 'post',
    data: data
  })
}
/**
 * 编辑合同
 * @param {Object} query
 */
export function edit(data) {
  return request({
    url: '/employeeContract/edit',
    method: 'put',
    data: data
  })
}
/**
 * 编辑合同
 * @param {Object} query
 */
export function getDetail(data) {
  return request({
    url: '/employeeContract/getDetail',
    method: 'get',
    params: data
  })
}
/**
 * 编辑合同
 * @param {Object} query
 */
export function del(data) {
  return request({
    url: '/employeeContract/delete',
    method: 'delete',
    params: data
  })
}

/**
 * 查询用户工号是否存在
 * @param {Object} query
 */
export function checkEmployeeCodeisExist(query) {
  return request({
    url: '/employeeContract/checkEmployeeCodeisExist',
    method: 'get',
    params:query
  })
}
/**
 * 查询用户工号下拉数据
 * @param {Object} query 工号
 */
export function getEmployeeCodeSelectItems(query) {
  return request({
    url: '/employeeContract/getEmployeeCodeSelectItems',
    method: 'get',
    params:query
  })
}
